#include"httplib.h"

#define SERVER_IP "0.0.0.0"
#define SERVER_PORT 8080

int main()
{
    httplib::Client client(SERVER_IP,SERVER_PORT); //用于搭建客户端
    
    httplib::MultipartFormData item;
    item.name = "file";
    item.filename = "hello.txt";
    item.content = "hello,world!"; //上传文件时这里给的就是文件内容
    item.content_type = "text/plain";
 
    httplib::MultipartFormDataItems items;
    items.push_back(item);

    auto res = client.Post("/multipart",items); 
    std::cout << res->status << std::endl; 
    std::cout << res->body << std::endl; 
    
    return 0; 
} 
